package com.music.note_android.di

import com.music.note_android.data.database.dao.NoteDao
import com.music.note_android.data.database.dao.FolderDao
import com.music.note_android.data.repository.NoteRepository
import com.music.note_android.data.repository.NoteRepositoryImpl
import com.music.note_android.data.repository.FolderRepository
import com.music.note_android.data.repository.FolderRepositoryImpl
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object RepositoryModule {
    
    @Provides
    @Singleton
    fun provideNoteRepository(
        noteDao: NoteDao
    ): NoteRepository {
        return NoteRepositoryImpl(noteDao)
    }
    
    @Provides
    @Singleton
    fun provideFolderRepository(
        folderDao: FolderDao
    ): FolderRepository {
        return FolderRepositoryImpl(folderDao)
    }
}